#!/usr/bin/env python
#    dft_b3lyp_cart
#    --------------
#    Molecule:         H2O
#    Wave Function:    DFT B3LYP
#    Test Purpose:     Check DFT-code with Cartesians

import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))

from runtest import version_info, get_filter, cli, run
from runtest_config import configure

assert version_info.major == 2

f = [
    get_filter(string='Final DFT energy',
               rel_tolerance=1.0e-8),
    get_filter(from_string='Dipole moment',
               num_lines=5,
               mask=[1],
               abs_tolerance=1.0e-5),
]

options = cli()

ierr = 0
for inp in ['dft_b3lyp_cart.dal']:
    for mol in ['H2O_intgrl.mol']:
        ierr += run(options,
                    configure,
                    input_files=[inp, mol],
                    filters={'out': f})

sys.exit(ierr)
